package cn.edu.jdbc.util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 * 数据库的连接工具
 */
public class DBUtil {

    static String url = "jdbc:mysql://localhost:3306/tedu?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true";
    static String user = "root";
    static String password = "root";

    public static Connection getConn() throws SQLException {
        return DriverManager.getConnection(url, user,password);
    }

}
